﻿@using JinRi.Services.Helpers

<form novalidate action="@Url.Action(Html.CurrentAction())" method="post">
    <div class="box box-warning">
        <div class="box-body">
            <div class="form-group">
                <label>标题</label>
                <input type="text" class="form-control" name="Title" required placeholder="标题" value="@Model.Title" />
            </div>
            <div class="form-group">
                <label>视频地址，注意是flash播放器的地址</label>
                <input type="text" class="form-control" name="Url" required placeholder="标题" value="@Model.Url" />
            </div>
            @if (Model.CoverImageId != Guid.Empty)
            {
                <div class="form-group">
                    <div>
                        <img src="@Url.Action("Thumb", "Image", new { id = Model.CoverImageId })" />
                    </div>
                </div>
            }
            <span class="btn btn-success fileinput-button">
                <i class="glyphicon glyphicon-plus"></i>
                <span>上传图片</span>
                <!-- The file input field used as target for the file upload widget -->
                <input id="fileupload" type="file" name="file" />
                <input id="imageId" type="hidden" name="coverImageId" value="@Model.CoverImageId" />
            </span>
            <div class="form-group">
                <div id="progress" class="progress">
                    <div class="progress-bar progress-bar-success"></div>
                </div>
                <div id="result"></div>
            </div>
        </div><!-- /.box-body -->
        <div class="box-footer">
            @Html.AntiForgeryToken()
            <div class="bg-danger">
                @Html.ValidationSummary(true)
            </div>
            <button type="submit" class="btn btn-primary">保存</button>
            <a href="@Url.Action("List")" class="btn btn-default">返回</a>
        </div>
    </div><!-- /.box -->
</form>


